//
//  KLKuaidiDetailCell.m
//  KL
//
//  Created by mac on 15/12/17.
//  Copyright © 2015年 zhouxubin. All rights reserved.
//

#import "KLKuaidiDetailCell.h"
#import "KLList.h"

@interface KLKuaidiDetailCell ()
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UILabel *detailLabel;

@property (weak, nonatomic) IBOutlet UIImageView *iconView;

@end

@implementation KLKuaidiDetailCell

#pragma mark - 重写setter方法,给属性赋值
- (void)setList:(KLList *)list {
    _list = list;
    
    // 时间label
    self.timeLabel.text = list.datetime;
    
    // 详情label
    self.detailLabel.text = list.remark;
    
    // 左侧的图标
    self.iconView.image = [UIImage imageNamed:@"iconfont-fenzhongshuxian"];
}

+ (instancetype)kuaidiDetailCellWithTableView:(UITableView *)tableView {
    KLKuaidiDetailCell *cell = [tableView dequeueReusableCellWithIdentifier:@"kuaidi_cell"];
    if (!cell) {
        cell = [self kuaidiDetailCell];
    }
    return cell;
}

+ (instancetype)kuaidiDetailCell {
    return [[NSBundle mainBundle] loadNibNamed:@"KLKuaidiDetailCell" owner:nil options:nil][0];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
